
#ifndef DUBBSTREAM_H
#define DUBBSTREAM_H

#include <ostream>

class dubbstream
{
	std::ostream & s1;
	std::ostream & s2;
public:

	explicit dubbstream(std::ostream & stream1, std::ostream & stream2) 
		: s1(stream1), s2(stream2) {}

	template<typename T> 
	dubbstream & operator << (T & arg)
	{
		s1 << arg;
		s2 << arg;
		return *this;
	}

	template<typename T> 
	dubbstream & operator << (const T & arg)
	{
		s1 << arg;
		s2 << arg;
		return *this;
	}

	dubbstream & operator << (std::ostream & (*arg)(std::ostream &))
	{
		s1 << arg;
		s2 << arg;
		return *this;
	}
};

#endif
